<%@ include file="public/include.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <link rel="stylesheet" type="text/css" href="styles/pub/default.css" >
  <script type="text/javascript" src="scripts/pub/jquery.js"></script>
  <script type="text/javascript" src="scripts/pub/common.js"></script>
  <script type="text/javascript" src="scripts/pub/date.js"></script>
  <script type="text/javascript" src="scripts/biz/apply.js"></script>
</head>

<body>
<div class="main" style="width:98%;">
	<form id="ApplySearch" name="ApplySearch" action="ApplySearch.do" method="post">
			<table border="0" cellspacing="0" cellpadding="0" align="center">
			  <caption>
				  备案申请列表
			  </caption>
			    <tr>
			      <td align="center">
			        <table border="0" style="width:75%;">
			          <tr>
			            <td width="22%"></td>
			            <td width="30%"></td>
			            <td width="12%"></td>
			            <td ></td>
			          </tr>
			          <tr height="25">
			            <td align="right">备案号</td>
			            <td><input type="text" name="applyCode" value="${map.capply.applyCode}"></td>
			            <td align="right">展会名</td>
			            <td><input type="text" name="exhName" value="${map.capply.exhName}"></td>
			          </tr>
			          <tr height="25">
			            <td align="right">开展日期范围</td>
			            <td>
			            	<input type="text" name="preContactor" value="${map.capply.preContactor}" class="readonly dateinput" readonly="readonly" onclick="setday(this)">
			            	~
							<input type="text" name="preTelephone" value="${map.capply.preTelephone}" class="readonly dateinput" readonly="readonly" onclick="setday(this)">
			            </td>
			            <td align="right">报检单位</td>
			            <td><mytag:select type="ent" name="entUserId" selectedCode="${map.capply.entUserId}"/></td>
			          </tr>
			          <tr height="25">
			            <td align="right">处理进度</td>
			            <td><mytag:select type="applyFlag" name="applyFlag" selectedCode="${map.capply.applyFlag}"/></td>
			            <td align="right">结案情况</td>
			            <td><mytag:select type="archiveFlag" name="archiveFlag" selectedCode="${map.capply.archiveFlag}"/></td>
			          </tr>
			          <tr class="button">
			            <td colspan="4">
			            	<input type="submit" value=" 查 询 " />&nbsp;
			              	<input type="button" value=" 清 空 " onclick="clearInput();" />
			            </td>
			          </tr>
			        </table>
			      </td>
			    </tr>
			  
			  <tr height="30">
			      <td align="center">
			      	<mytag:pagination pager="${map.page}" pageSize="10"  suppressHidden="true"/>
			      </td>
			  </tr>
			  <tbody>
			    <tr>
			      <td align="center">
			        <table class="list" style="width:100%;">
			          <tr class="title">
			            <td>序号</td>
			            <td>备案号</td>
			            <td width="35%">展会名</td>
			            <td>报检单位</td>
			            <td>开展日期</td>
			            <td>毕展日期</td>
			            <td>处理进度</td>
			            <td>结案状态</td>
			            <td>操作选择</td>
			          </tr>
					<c:forEach items="${map.page.items}" varStatus="stat" var="apply">
			          <tr>
			            <td>${stat.count+map.page.seq}</td>
			            <td>${apply.applyCode}</td>
			            <td>${apply.exhName}</td>
			            <td><mytag:c2s key="${apply.entUserId}" type="ent"/></td>
			            <td>${myfunc:d2s(apply.beginDate)}</td>
			            <td>${myfunc:d2s(apply.endDate)}</td>
			            <td><mytag:c2s key="${apply.applyFlag}" type="applyFlag"/></td>
			            <td><mytag:c2s key="${apply.archiveFlag}" type="archiveFlag"/></td>
			            <td>
			            	<security:authorize ifAnyGranted="ROLE_APPLY_VIEW">
			            		<a class="deco" href="ApplyCensor.html?opt=view&id=${apply.id}">查看</a>
			            	</security:authorize>
			            	<c:if test="${apply.applyFlag==1&&myfunc:containAll('ROLE_APPLY_CENSOR',map.currentUser.authorityNames)}">
			            		<a class="deco" href="ApplyCensor.html?id=${apply.id}">审核</a>
			            	</c:if>
			            	<c:if test="${apply.applyFlag==4&&myfunc:containAll('ROLE_APPLY_AUDIT',map.currentUser.authorityNames)}">
			            		<a class="deco" href="ApplyCensor.html?id=${apply.id}">审批</a>
			            	</c:if>
			            	<c:if test="${apply.applyFlag==1&&myfunc:containAll('ROLE_APPLY_CENSOR',map.currentUser.authorityNames)}">
			            		<a class="deco" href="#" onclick="applyDelete(${apply.id});">删除</a>
			            	</c:if>
			            </td>
			          </tr>
					</c:forEach>
			        </table>
			      </td>
			    </tr>
			  </tbody>
			    <tr height="30">
			      <td align="center">
			      	<mytag:pagination pager="${map.page}" pageSize="10"  suppressHidden="false"/>
			      </td>
			    </tr>
			</table>
        	<security:authorize ifAnyGranted="ROLE_APPLY_CENSOR">
        		<input type="hidden" name="deleteApplyId" id="deleteApplyId">
        	</security:authorize>
	</form>
</div>
</body>
</html>
